<% if @bugs.empty? %>
  <p><%= t :no_bugs, :scope => [:helpers, :messages, :bug] %></p>
<% else %>
  <p class="gru-bugs frame">
    <span class="gru-bugs float id"><b><%= t :id, :scope => [:helpers, :headlines, :bug] %></b></span>
    <span class="gru-bugs float priority"><b><%= t :priority, :scope => [:helpers, :headlines, :bug] %></b></span>
    <span class="gru-bugs float status"><b><%= t :status, :scope => [:helpers, :headlines, :bug] %></b></span>
    <span class="gru-bugs float title"><b><%= t :title, :scope => [:helpers, :headlines, :bug] %></b></span>
    <span class="gru-bugs float author"><b><%= t :author, :scope => [:helpers, :headlines, :bug] %></b></span>
    <span class="gru-bugs float processor"><b><%= t :processor, :scope => [:helpers, :headlines, :bug] %></b></span>
    <span class="gru-bugs float created"><b><%= t :created, :scope => [:helpers, :headlines, :bug] %></b></span>
  </p>

  <% i = @bugs.size + 1;  @bugs.each do |bug| %>
    <p class="gru-bugs frame item">
      <span class="gru-bugs float id"><%= i -= 1 %></span>
      <span class="gru-bugs float priority"><%= t bug.priority, :scope => "activerecord.attributes.values.bug.priorities" %></span>
      <span class="gru-bugs float status"><%= t bug.status, :scope => "activerecord.attributes.values.bug.statuses" %></span>
      <span class="gru-bugs float title"><%= link_to bug.title, project_bug_path(params[:project_id], bug) %></span>
      <span class="gru-bugs float author"><%= bug.author.alias %></span>
      <span class="gru-bugs float processor"><%= bug.processor.alias %></span>
      <span class="gru-bugs float created"><%= l(bug.created_at, :format => :short) %></span>
    </p>
  <% end %>
<% end %>

<div class="gru-bugs frame">
  <%= link_to (t :new_bug, :scope => [:helpers, :navigation, :bug]), new_project_bug_path %>
</div>